.class public Lcom/estrongs/android/ui/guesture/ESGesturePanel;
.super Landroid/view/View;
.source "ESGesturePanel.java"


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "NewApi"
    }
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;
    }
.end annotation


# instance fields
.field public a:Z

.field private b:Z

.field public c:Z

.field private d:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList<",
            "Landroid/graphics/PointF;",
            ">;"
        }
    .end annotation
.end field

.field private e:Landroid/graphics/Paint;

.field private f:Landroid/graphics/Paint;

.field private g:Landroid/graphics/Bitmap;

.field private h:I

.field private i:Landroid/graphics/Bitmap;

.field private j:I

.field private k:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Landroid/gesture/GesturePoint;",
            ">;"
        }
    .end annotation
.end field

.field private l:Landroid/gesture/Gesture;

.field private m:I

.field private n:I

.field private o:I

.field private p:I

.field private q:I

.field private r:I

.field private s:I

.field private t:Landroid/graphics/Paint;

.field private u:Landroid/graphics/Path;

.field private v:Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 1
    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x1

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a:Z

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    .line 4
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    .line 5
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    const/4 v0, 0x0

    .line 6
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    .line 7
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    .line 8
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    const/16 v1, 0x20

    .line 9
    iput v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    .line 10
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    .line 11
    iput v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    .line 12
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    .line 13
    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    const v0, 0x59009ae2

    .line 14
    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    const/4 v0, -0x1

    .line 15
    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    .line 16
    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->o:I

    .line 17
    iput p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->p:I

    .line 18
    new-instance p1, Landroid/graphics/Paint;

    invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->t:Landroid/graphics/Paint;

    .line 19
    new-instance p1, Landroid/graphics/Path;

    invoke-direct {p1}, Landroid/graphics/Path;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    .line 20
    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, 0x1

    .line 21
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a:Z

    const/4 p1, 0x0

    .line 22
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    .line 23
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    .line 24
    new-instance p2, Ljava/util/LinkedList;

    invoke-direct {p2}, Ljava/util/LinkedList;-><init>()V

    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    const/4 p2, 0x0

    .line 25
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    .line 26
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    .line 27
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    const/16 v0, 0x20

    .line 28
    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    .line 29
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    .line 30
    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    .line 31
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    .line 32
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    const p2, 0x59009ae2

    .line 33
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    const/4 p2, -0x1

    .line 34
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    .line 35
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->o:I

    .line 36
    iput p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->p:I

    .line 37
    new-instance p1, Landroid/graphics/Paint;

    invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->t:Landroid/graphics/Paint;

    .line 38
    new-instance p1, Landroid/graphics/Path;

    invoke-direct {p1}, Landroid/graphics/Path;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 39
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x1

    .line 40
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a:Z

    const/4 p1, 0x0

    .line 41
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    .line 42
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    .line 43
    new-instance p2, Ljava/util/LinkedList;

    invoke-direct {p2}, Ljava/util/LinkedList;-><init>()V

    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    const/4 p2, 0x0

    .line 44
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    .line 45
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    .line 46
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    const/16 p3, 0x20

    .line 47
    iput p3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    .line 48
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    .line 49
    iput p3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    .line 50
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    .line 51
    iput-object p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    const p2, 0x59009ae2

    .line 52
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    const/4 p2, -0x1

    .line 53
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    .line 54
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->o:I

    .line 55
    iput p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->p:I

    .line 56
    new-instance p1, Landroid/graphics/Paint;

    invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->t:Landroid/graphics/Paint;

    .line 57
    new-instance p1, Landroid/graphics/Path;

    invoke-direct {p1}, Landroid/graphics/Path;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    monitor-enter v0

    .line 6
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->clear()V

    .line 7
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 8
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void

    :catchall_0
    move-exception v1

    .line 9
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method public a(FF)V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    new-instance v2, Landroid/graphics/PointF;

    invoke-direct {v2, p1, p2}, Landroid/graphics/PointF;-><init>(FF)V

    invoke-virtual {v1, v2}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    .line 3
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(II)V
    .locals 0

    .line 10
    iput p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    .line 11
    iput p2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    .line 12
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method public b()V
    .locals 2

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    .line 2
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 4
    iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 5
    iget v0, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    .line 6
    invoke-static {v1, v0}, Ljava/lang/Math;->min(II)I

    move-result v0

    .line 7
    div-int/lit8 v1, v0, 0x24

    iput v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    .line 8
    div-int/lit8 v0, v0, 0x18

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->o:I

    .line 9
    :cond_0
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method public c()V
    .locals 2

    .line 1
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    .line 2
    :goto_0
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    .line 3
    invoke-virtual {v0, v1}, Lcom/estrongs/android/pop/l;->a(Z)Landroid/graphics/Point;

    move-result-object v0

    if-nez v0, :cond_1

    const/4 v0, -0x1

    .line 4
    invoke-virtual {p0, v0, v0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a(II)V

    goto :goto_1

    .line 5
    :cond_1
    iget v1, v0, Landroid/graphics/Point;->x:I

    iget v0, v0, Landroid/graphics/Point;->y:I

    invoke-virtual {p0, v1, v0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a(II)V

    :goto_1
    return-void
.end method

.method public getGesture()Landroid/gesture/Gesture;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    return-object v0
.end method

.method public getGestureStartX()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    return v0
.end method

.method public getGestureStartY()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    return v0
.end method

.method public onDraw(Landroid/graphics/Canvas;)V
    .locals 9

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 3
    iget-boolean v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a:Z

    if-eqz v1, :cond_b

    .line 4
    iget v0, v0, Landroid/util/DisplayMetrics;->densityDpi:I

    div-int/lit16 v0, v0, 0xa0

    iget v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->p:I

    mul-int v0, v0, v1

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->q:I

    .line 5
    iget-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z

    const/4 v1, -0x1

    if-eqz v0, :cond_7

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    monitor-enter v0

    .line 7
    :try_start_0
    iget-object v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    invoke-virtual {v2}, Ljava/util/LinkedList;->size()I

    move-result v2

    new-array v3, v2, [Landroid/graphics/PointF;

    .line 8
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    invoke-virtual {v4, v3}, Ljava/util/LinkedList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    .line 9
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    const/4 v0, 0x1

    if-le v2, v0, :cond_3

    .line 10
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    if-nez v4, :cond_0

    .line 11
    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    iput-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    .line 12
    iget v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->n:I

    int-to-float v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 13
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    iget v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    .line 14
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 15
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->setDither(Z)V

    .line 16
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    .line 17
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V

    .line 18
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 19
    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    iput-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    .line 20
    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 21
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->setDither(Z)V

    .line 22
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 23
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    iget v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    :cond_0
    const/4 v4, 0x0

    .line 24
    aget-object v4, v3, v4

    .line 25
    iget-boolean v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    if-eqz v5, :cond_1

    .line 26
    iget v5, v4, Landroid/graphics/PointF;->x:F

    iget v6, v4, Landroid/graphics/PointF;->y:F

    iget v7, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->o:I

    int-to-float v7, v7

    iget-object v8, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->f:Landroid/graphics/Paint;

    invoke-virtual {p1, v5, v6, v7, v8}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    .line 27
    :cond_1
    iget-object v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    invoke-virtual {v5}, Landroid/graphics/Path;->reset()V

    .line 28
    iget-object v5, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    iget v6, v4, Landroid/graphics/PointF;->x:F

    iget v4, v4, Landroid/graphics/PointF;->y:F

    invoke-virtual {v5, v6, v4}, Landroid/graphics/Path;->moveTo(FF)V

    :goto_0
    if-ge v0, v2, :cond_2

    .line 29
    iget-object v4, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    aget-object v5, v3, v0

    iget v5, v5, Landroid/graphics/PointF;->x:F

    aget-object v6, v3, v0

    iget v6, v6, Landroid/graphics/PointF;->y:F

    invoke-virtual {v4, v5, v6}, Landroid/graphics/Path;->lineTo(FF)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 30
    :cond_2
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->u:Landroid/graphics/Path;

    iget-object v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->e:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v2}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 31
    :cond_3
    iget-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    if-nez v0, :cond_b

    .line 32
    :try_start_1
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    if-nez v0, :cond_4

    .line 33
    invoke-virtual {p0}, Landroid/view/View;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v2, 0x7f080410

    .line 34
    invoke-static {v0, v2}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    .line 35
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    .line 36
    invoke-virtual {p0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c()V

    .line 37
    :cond_4
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    if-ne v0, v1, :cond_5

    .line 38
    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    .line 39
    :cond_5
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    if-ne v0, v1, :cond_6

    .line 40
    invoke-virtual {p0}, Landroid/view/View;->getHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iget v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->q:I

    add-int/2addr v0, v1

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    .line 41
    :cond_6
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->i:Landroid/graphics/Bitmap;

    iget v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    iget v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    sub-int/2addr v1, v2

    int-to-float v1, v1

    iget v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    iget v3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->j:I

    sub-int/2addr v2, v3

    int-to-float v2, v2

    iget-object v3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->t:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    :catch_0
    move-exception p1

    .line 42
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1

    :catchall_0
    move-exception p1

    .line 43
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw p1

    .line 44
    :cond_7
    iget-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    if-nez v0, :cond_b

    invoke-static {}, Lcom/estrongs/android/ui/guesture/b;->b()Z

    move-result v0

    if-eqz v0, :cond_b

    sget-boolean v0, Lcom/estrongs/android/ui/guesture/b;->e:Z

    if-eqz v0, :cond_b

    .line 45
    :try_start_3
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    if-nez v0, :cond_8

    .line 46
    invoke-virtual {p0}, Landroid/view/View;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v2, 0x7f08040f

    .line 47
    invoke-static {v0, v2}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    .line 48
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    int-to-float v0, v0

    .line 49
    sput v0, Lcom/estrongs/android/ui/guesture/ESGestureCtrl;->e:F

    .line 50
    invoke-virtual {p0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c()V

    .line 51
    :cond_8
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    if-ne v0, v1, :cond_9

    .line 52
    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    .line 53
    :cond_9
    iget v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    if-ne v0, v1, :cond_a

    .line 54
    invoke-virtual {p0}, Landroid/view/View;->getHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iget v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->q:I

    add-int/2addr v0, v1

    iput v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    .line 55
    :cond_a
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->g:Landroid/graphics/Bitmap;

    iget v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->r:I

    iget v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    sub-int/2addr v1, v2

    int-to-float v1, v1

    iget v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->s:I

    iget v3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->h:I

    sub-int/2addr v2, v3

    int-to-float v2, v2

    iget-object v3, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->t:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_1

    :catch_1
    move-exception p1

    .line 56
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_b
    :goto_1
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 6

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->c:Z

    if-eqz v0, :cond_7

    const/4 v0, 0x0

    .line 2
    :try_start_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionIndex()I

    move-result v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    :goto_0
    if-eqz v0, :cond_0

    .line 3
    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1

    .line 4
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-eqz v0, :cond_4

    if-eq v0, v2, :cond_3

    const/4 v3, 0x2

    if-eq v0, v3, :cond_2

    const/4 p1, 0x3

    if-eq v0, p1, :cond_1

    goto/16 :goto_2

    .line 5
    :cond_1
    invoke-virtual {p0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a()V

    .line 6
    iget-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    invoke-virtual {p1}, Ljava/util/ArrayList;->clear()V

    .line 7
    iput-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    goto/16 :goto_2

    .line 8
    :cond_2
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    invoke-virtual {p0, v0, v1}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a(FF)V

    .line 9
    invoke-virtual {p0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b()V

    .line 10
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    new-instance v1, Landroid/gesture/GesturePoint;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result p1

    .line 11
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-direct {v1, v3, p1, v4, v5}, Landroid/gesture/GesturePoint;-><init>(FFJ)V

    .line 12
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 13
    :cond_3
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    new-instance v1, Landroid/gesture/GesturePoint;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result p1

    .line 14
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-direct {v1, v3, p1, v4, v5}, Landroid/gesture/GesturePoint;-><init>(FFJ)V

    .line 15
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 16
    new-instance p1, Landroid/gesture/Gesture;

    invoke-direct {p1}, Landroid/gesture/Gesture;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    .line 17
    new-instance v0, Landroid/gesture/GestureStroke;

    iget-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Landroid/gesture/GestureStroke;-><init>(Ljava/util/ArrayList;)V

    invoke-virtual {p1, v0}, Landroid/gesture/Gesture;->addStroke(Landroid/gesture/GestureStroke;)V

    .line 18
    iget-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->v:Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;

    if-eqz p1, :cond_6

    .line 19
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    invoke-interface {p1, v0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;->a(Landroid/gesture/Gesture;)V

    goto :goto_2

    .line 20
    :cond_4
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    if-eqz v0, :cond_5

    .line 21
    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    goto :goto_1

    .line 22
    :cond_5
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    .line 23
    :goto_1
    invoke-virtual {p0}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a()V

    .line 24
    iput-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    .line 25
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    invoke-virtual {p0, v0, v1}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a(FF)V

    .line 26
    iget-object v0, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    new-instance v1, Landroid/gesture/GesturePoint;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result p1

    .line 27
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-direct {v1, v3, p1, v4, v5}, Landroid/gesture/GesturePoint;-><init>(FFJ)V

    .line 28
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_6
    :goto_2
    return v2

    .line 29
    :cond_7
    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1
.end method

.method public setForegroundColor(I)V
    .locals 0

    .line 1
    iput p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->m:I

    return-void
.end method

.method public setGesture(Landroid/gesture/Gesture;)V
    .locals 4

    if-nez p1, :cond_0

    return-void

    .line 1
    :cond_0
    :try_start_0
    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    .line 2
    invoke-virtual {p1}, Landroid/gesture/Gesture;->getStrokes()Ljava/util/ArrayList;

    move-result-object p1

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/gesture/GestureStroke;

    .line 3
    iget-object v1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    monitor-enter v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 4
    :try_start_1
    iget-object v2, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->d:Ljava/util/LinkedList;

    invoke-virtual {v2}, Ljava/util/LinkedList;->clear()V

    .line 5
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 6
    :goto_0
    :try_start_2
    iget-object v1, p1, Landroid/gesture/GestureStroke;->points:[F

    array-length v1, v1

    if-ge v0, v1, :cond_1

    .line 7
    iget-object v1, p1, Landroid/gesture/GestureStroke;->points:[F

    aget v1, v1, v0

    iget-object v2, p1, Landroid/gesture/GestureStroke;->points:[F

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    invoke-virtual {p0, v1, v2}, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->a(FF)V

    add-int/lit8 v0, v0, 0x2

    goto :goto_0

    :cond_1
    const/4 p1, 0x1

    .line 8
    iput-boolean p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->b:Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_1

    :catchall_0
    move-exception p1

    .line 9
    :try_start_3
    monitor-exit v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    throw p1
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    :catch_0
    const/4 p1, 0x0

    .line 10
    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->l:Landroid/gesture/Gesture;

    .line 11
    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->k:Ljava/util/ArrayList;

    :goto_1
    return-void
.end method

.method public setOnGestureCompleteListener(Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/guesture/ESGesturePanel;->v:Lcom/estrongs/android/ui/guesture/ESGesturePanel$a;

    return-void
.end method
